<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>用户列表 - 用户中心</title>
<%@ include file="/common/include/title.jsp"%>
</head>
<body>
	<%@ include file="/common/include/header.jsp"%>
	<!-- 网页头部结束 -->
	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-10 col-sm-offset-1 main">
				<h2 class="sub-header">用户列表</h2>
				<form action="" method="post" class="form-inline">
					<div class="form-group">
						<label for="keyword">关键字:</label>
						<input type="text" name="keyword" value="${param.keyword }" class="form-control">
						<label for="email">更新时间:</label>
						<input type="text" name="st" value="${param.st }" readonly="true" class="form-control" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"/>
						-->
						<input type="text" name="ed" value="${param.ed }" readonly="true" class="form-control" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"/>
						<input type="submit" class="btn btn-primary" value="搜索">
					</div>
				</form>
				<div class="table-responsive">
					<table class="table table-striped">
						<thead>
							<tr>
								<th>序号</th>
								<th width="20%">邮箱</th>
								<th width="20%">昵称</th>
								<th>注册时间</th>
								<th>上次登陆时间</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${requestScope.usersList }" var="users" varStatus="stat">
								<tr>
									<td>${stat.count }</td>
									<td>${users.email }</td>
									<td>${users.nickName }</td>
									<td><fmt:formatDate value="${users.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
									<td><fmt:formatDate value="${users.lastLoginTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					
					<form id="usersListPageForm" action="${rootpath }/head/users/usersList.html"
						method="post">
						
						<!-- 设置一些参数 -->
						<input type="hidden" name="keyword" value="${param.keyword }">
						<input type="hidden" name="status" value="${param.status }">
						<input type="hidden" name="st" value="${param.st }">
						<input type="hidden" name="ed" value="${param.ed }">
						<nav>
							<ul class="pager">
								<li><a href="#" onclick="return pageForm('usersListPageForm','currentPage','1','pageSize','${requestScope.pageInfoUtil.pageSize }');"><span>首页</span></a></li>
								<li><a href="#" onclick="return pageForm('usersListPageForm','currentPage','${requestScope.pageInfoUtil.prePage }','pageSize','${requestScope.pageInfoUtil.pageSize }');"><span>上一页</span></a></li>
								<li><a href="#" onclick="return pageForm('usersListPageForm','currentPage','${requestScope.pageInfoUtil.nextPage }','pageSize','${requestScope.pageInfoUtil.pageSize }');"><span>下一页</span></a></li>
								<li><a href="#" onclick="return pageForm('usersListPageForm','currentPage','${requestScope.pageInfoUtil.totalPage }','pageSize','${requestScope.pageInfoUtil.pageSize }');"><span>尾页</span></a></li>
								<li>共${requestScope.pageInfoUtil.totalPage }页,共${requestScope.pageInfoUtil.totalRecord }条</li>
								<li>第<input type="text" id="currentPage" name="currentPage" value="${requestScope.pageInfoUtil.currentPage }" size="5" maxlength="5"/>页</li>
								<li><input type="text" id="pageSize" name="pageSize" value="${requestScope.pageInfoUtil.pageSize }" size="5" maxlength="5"/></li>
								<li><input type="submit" value="GO" class="btn btn-primary"/></li>
							</ul>
						</nav>
					</form>
				</div>
			</div>
		</div>
	</div>
	<%@ include file="/common/include/footer.jsp"%>
</body>
</html>